package com.tca.spring.framework.learning.ioc;

import com.tca.spring.framework.learning.ioc.autowired.A;
import com.tca.spring.framework.learning.ioc.autowired.B;
import com.tca.spring.framework.learning.ioc.config.AutowiredConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author zhoua
 * @Date 2021/5/2
 */
@Slf4j
public class SpringAutowiredAnnotationStarter {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AutowiredConfiguration.class);
        A a = applicationContext.getBean(A.class);
        log.info("a = {}", a);
    }
}
